package com.ourteam.product.requirement.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-11 15:23:42 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductDefineBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.requirement.dao.ProductDefine productDefine;

  protected BeanMap getBeanMap() {

    return new BeanMap(productDefine);
  }

  static {
    mappedDaoFields.put(
        "catalogId", com.ourteam.product.requirement.dao.IProductDefineDAO.CatalogId);

    mappedDaoFields.put("id", com.ourteam.product.requirement.dao.IProductDefineDAO.Id);

    mappedDaoFields.put("code", com.ourteam.product.requirement.dao.IProductDefineDAO.ProductCode);

    mappedDaoFields.put("name", com.ourteam.product.requirement.dao.IProductDefineDAO.ProductName);

    mappedDaoFields.put("remarks", com.ourteam.product.requirement.dao.IProductDefineDAO.Remarks);

    mappedDaoFields.put("status", com.ourteam.product.requirement.dao.IProductDefineDAO.Status);

    mappedDaoFields.put(
        "submitterId", com.ourteam.product.requirement.dao.IProductDefineDAO.SubmitterId);

    mappedDaoFields.put(
        "creatorName", com.ourteam.product.requirement.dao.IProductDefineDAO.CreatorName);

    mappedDaoFields.put(
        "createTime", com.ourteam.product.requirement.dao.IProductDefineDAO.CreateTime);

    mappedDaoFields.put(
        "lastModifierName", com.ourteam.product.requirement.dao.IProductDefineDAO.LastModifierName);

    mappedDaoFields.put(
        "lastModifyTime", com.ourteam.product.requirement.dao.IProductDefineDAO.LastModifyTime);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductDefineBean() {
    super();

    this.productDefine = new com.ourteam.product.requirement.dao.ProductDefine();
  }

  public ProductDefineBean(com.ourteam.product.requirement.dao.ProductDefine productDefine) {
    super();

    this.productDefine = productDefine;
  }

  public com.ourteam.product.requirement.dao.ProductDefine convertToProductDefine() {
    return this.productDefine;
  }

  public com.ourteam.product.requirement.dao.ProductDefine convertTo() {
    return this.productDefine;
  }

  /**
   * Get catalogId
   *
   * @return long
   */
  public long getCatalogId() {
    return (long) this.productDefine.getCatalogId();
  }

  /**
   * Set catalogId
   *
   * @parameter long
   */
  public void setCatalogId(long catalogId) {

    this.productDefine.setCatalogId(catalogId);
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productDefine.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productDefine.setId(id);
  }

  /**
   * Get code
   *
   * @return String
   */
  public String getCode() {
    return (String) this.productDefine.getProductCode();
  }

  /**
   * Set code
   *
   * @parameter String
   */
  public void setCode(String code) {

    this.productDefine.setProductCode(code);
  }

  /**
   * Get name
   *
   * @return String
   */
  public String getName() {
    return (String) this.productDefine.getProductName();
  }

  /**
   * Set name
   *
   * @parameter String
   */
  public void setName(String name) {

    this.productDefine.setProductName(name);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productDefine.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productDefine.setRemarks(remarks);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productDefine.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productDefine.setStatus(status);
  }

  /**
   * Get submitterId
   *
   * @return long
   */
  public long getSubmitterId() {
    return (long) this.productDefine.getSubmitterId();
  }

  /**
   * Set submitterId
   *
   * @parameter long
   */
  public void setSubmitterId(long submitterId) {

    this.productDefine.setSubmitterId(submitterId);
  }

  /**
   * Get creatorName
   *
   * @return String
   */
  public String getCreatorName() {
    return (String) this.productDefine.getCreatorName();
  }

  /**
   * Set creatorName
   *
   * @parameter String
   */
  public void setCreatorName(String creatorName) {

    this.productDefine.setCreatorName(creatorName);
  }

  /**
   * Get createTime
   *
   * @return java.util.Date
   */
  public java.util.Date getCreateTime() {
    return (java.util.Date) this.productDefine.getCreateTime();
  }

  /**
   * Set createTime
   *
   * @parameter java.util.Date
   */
  public void setCreateTime(java.util.Date createTime) {

    this.productDefine.setCreateTime(createTime);
  }

  /**
   * Get lastModifierName
   *
   * @return String
   */
  public String getLastModifierName() {
    return (String) this.productDefine.getLastModifierName();
  }

  /**
   * Set lastModifierName
   *
   * @parameter String
   */
  public void setLastModifierName(String lastModifierName) {

    this.productDefine.setLastModifierName(lastModifierName);
  }

  /**
   * Get lastModifyTime
   *
   * @return java.util.Date
   */
  public java.util.Date getLastModifyTime() {
    return (java.util.Date) this.productDefine.getLastModifyTime();
  }

  /**
   * Set lastModifyTime
   *
   * @parameter java.util.Date
   */
  public void setLastModifyTime(java.util.Date lastModifyTime) {

    this.productDefine.setLastModifyTime(lastModifyTime);
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductDefineBean) == false) {
      return false;
    } // end if

    ProductDefineBean other = (ProductDefineBean) obj;

    boolean isEqual = false;

    com.ourteam.product.requirement.dao.ProductDefine tempProductDefine =
        other.convertToProductDefine();

    if (tempProductDefine == null || this.productDefine == null) {
      isEqual = false;
    } else if (tempProductDefine == this.productDefine
        || tempProductDefine.equals(this.productDefine)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductDefineBean[] toArray(
      com.ourteam.product.requirement.dao.ProductDefine[] aProductDefines) {

    return toArray(aProductDefines, null);
  }

  public static ProductDefineBean[] toArray(
      com.ourteam.product.requirement.dao.ProductDefine[] aProductDefines,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductDefines)) {
      return new ProductDefineBean[0];
    }

    int length = aProductDefines.length;

    ProductDefineBean[] beans = new ProductDefineBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductDefineBean(aProductDefines[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductDefines[i]});
      }
    }

    return beans;
  }
}
